﻿/******************************************************************************
 * Copyright (C) 2015  671643387@qq.com
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 *****************************************************************************/

#ifndef SHARED_OPCODEDEFINE_H_
#define SHARED_OPCODEDEFINE_H_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

namespace Shared {

    ///////////////////////////////////////////////////////////////////////////
    /* 操作码列表 */
    enum OpcodesList
    {
        MSG_NULL_ACTION                         = 0x000,

        CMSG_CHAR_CREATE                        = 0x036,    /* 创建角色 */
        CMSG_CHAR_ENUM							= 0x037,    /* 枚举角色 */
        SMSG_CHAR_CREATE                        = 0x03A,
        SMSG_CHAR_ENUM							= 0x03B,

        CMSG_PING                               = 0x1DC,
        SMSG_PONG                               = 0x1DD,
        SMSG_AUTH_CHALLENGE                     = 0x1EC,
        CMSG_AUTH_SESSION                       = 0x1ED,
        SMSG_AUTH_RESPONSE                      = 0x1EE,

        SMSG_ADDON_INFO                         = 0x2EF,

        CMSG_KEEP_ALIVE                         = 0x406,    /* 连接保活 */
    };
#define NUM_MSG_TYPES                         0x424

}

#endif // SHARED_OPCODEDEFINE_H_
